{% extends "OspProductBundle::layout.html.twig" %}

{% block OspProduct_body %}
	<h3>Modification du produit {{product.libelle ~ " (" ~ product.id ~ ")"}}</h3>

	<div class="well form-inline">
		<form method="post" {{ form_enctype(form) }}>
			
			<legend>Modifier un produit</legend>
			<table class="table table-striped">
				<thead>
					<tr>
						<th>Photo</th>
						<th>Catégorie</th>
						<th>Libellé</th>
						<th>Description</th>
					</tr>
				</thead>
				
				<tbody>
					<tr>
						<td>{{ form_widget(form.photo, { value : product.photo,'attr': {'class': 'input-small'} }) }}</td>
						<td>{{ form_widget(form.categorie, { value : product.categorie,'attr': {'class': 'input-small'} }) }}</td>
						<td>{{ form_widget(form.libelle, { value : product.libelle,'attr': {'class': 'input-small'} }) }}</td>
						<td>{{ form_widget(form.description, { value : product.description,'attr': {'class': 'input-small'} }) }}</td>
					</tr>	
				</tbody>

				<thead>
					<tr>
						<th>Lien</th>
						<th>Poids</th>
						<th>Prix</th>
					</tr>
				</thead>

				<tbody>
					<tr>
						<td>{{ form_widget(form.lien, { value : product.lien,'attr': {'class': 'input-small'} }) }}</td>
						<td>{{ form_widget(form.poids, { value : product.poids,'attr': {'class': 'input-small'} }) }}</td>
						<td>{{ form_widget(form.prix, { value : product.prix,'attr': {'class': 'input-small'} }) }}</td>
					</tr>	
				</tbody>
			</table>
			<input type="submit" class="btn btn-primary" value="Modifier Produit" style="margin-left:65%" />
			<a href="{{ path('osp_product_homepage') }}" class="btn btn-primary">Annuler<a/>
			{{ form_rest(form) }}
		</form>
	</div>

{% endblock %}